#include <stdio.h>
#include <malloc.h>
#include <unistd.h>

int main(void)
{
	char *p = malloc(100000);
	int pid;
	pid = fork();

	if (pid) {
		printf("Freeing in parent\n");
		free(p);
	} else {
		execlp("/bin/ls", "ls", NULL);
		printf("Freeing in child\n");
		free(p);
	}

	return 0;
}

